package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author xiaobai
 * @create 2024-03-09 23:14
 */

@Mapper
public interface OrderDetailMapper {

    /*
    * 批量插入订单明细
    * */
    void insertBatch(List<OrderDetail> orderDetailList);


    /*
    * 根据订单ID获取订单详情
    * */
    @Select("select * from order_detail where order_id=#{orderId}")
    List<OrderDetail> getByOrderId(Long orderId);
}
